package com.atguigu.springcloud.config;

import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: lihan
 * @Date : 2022/1/29- 01
 * @DESCRIPTION: com.atguigu.springcloud.config
 * @version: 1.0
 */
//@Configuration
public class GatewayConfig {
  //  @Bean
    public RouteLocator customRoutes(RouteLocatorBuilder builder){

        return builder.routes()
                    .route("path_atguigu",r-> r.path("/payment/get/** ")
                    .uri("http://localhost:8001"))
                    .build();
    }
}
